package cn.kgc.se.day06.work;

/**
 * @author 课工场
 * @date 2024/3/21
 * @description
 *  开发一个程序，根据公式（身高-108）*2=体重，可以有10斤左右的浮动。来观察测试者体重是否合适
 *
 *  120    110  130
 */
public class Demo07 {

    public static void main(String[] args) {

        int height = 175;
        int weight = 140;

        int standWeight = (height-108)*2;
        int maxWeight = standWeight+10;
        int minWeight = standWeight-10;

        if (weight>=minWeight && weight<=maxWeight){
            System.out.println("恭喜你,是标准体重");
        }else {
            System.out.println("体重不合格");
        }

    }
}
